home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Text / WASTE / WASTE 1.1.2 Distribution / WASTE Source / WELongCoords.p < prev    next >
Encoding:
Text File  |  1995-10-12  |  1.3 KB  |  58 lines  |  [TEXT/CWIE]

  1. unit WELongCoords;
  2.  
  3. { WASTE PROJECT: }
  4. { Long Coordinates: data types and function prototypes }
  5.  
  6. { Copyright © 1993-1995 Marco Piovanelli }
  7. { All Rights Reserved }
  8.  
  9. interface
  10.     uses
  11.         Types;
  12.  
  13.     type
  14.  
  15.         LongPt = record
  16.                 case Integer of
  17.                     0: (
  18.                             v: LongInt;
  19.                             h: LongInt;
  20.                     );
  21.                     1: (
  22.                             vh: array[0..1] of LongInt;
  23.                     );
  24.             end;  { LongPt }
  25.  
  26.         LongRect = record
  27.                 case Integer of
  28.                     0: (
  29.                             top: LongInt;
  30.                             left: LongInt;
  31.                             bottom: LongInt;
  32.                             right: LongInt;
  33.                     );
  34.                     1: (
  35.                             topLeft: LongPt;
  36.                             botRight: LongPt;
  37.                     );
  38.             end;  { LongRect }
  39.  
  40.     function _WEPinInRange (value: LongInt;
  41.                                     rangeStart, rangeEnd: LongInt): LongInt;
  42.     procedure WELongPointToPoint ({const} var lp: LongPt;
  43.                                     var p: Point);
  44.     procedure WEPointToLongPoint (p: Point;
  45.                                     var lp: LongPt);
  46.     procedure WESetLongRect (var lr: LongRect;
  47.                                     left, top, right, bottom: LongInt);
  48.     procedure WELongRectToRect ({const} var lr: LongRect;
  49.                                     var r: Rect);
  50.     procedure WERectToLongRect ({const} var r: Rect;
  51.                                     var lr: LongRect);
  52.     procedure WEOffsetLongRect (var lr: LongRect;
  53.                                     hOffset, vOffset: LongInt);
  54.     function WELongPointInLongRect ({const} var lp: LongPt;
  55.                                     {const} var lr: LongRect): Boolean;
  56.  
  57. implementation
  58. end.